#pragma once
const double PI=3.14159265358979323846;

class PGLSHAPE_API CPGLGeoCircle:public CPGLLine2D
{
private:
	double m_radius;
	CPGLPointD m_center;
	void ReDraw();
public:
	CPGLGeoCircle():m_radius(1),m_center(CPGLPointD(0,0)){ReDraw();}
	CPGLGeoCircle(double x,double y,double radius):m_center(CPGLPointD(x,y)),m_radius(radius){ReDraw();}
	~CPGLGeoCircle(){}
	void SetRadius(double radius)
	{
		if(m_radius-radius<TOL)
			return;
		m_radius=radius;
		ReDraw();
	}
	double GetRadius(){return m_radius;}
	void SetCenter(double x,double y)
	{
		if(m_center.x-x<TOL&&m_center.y-y<TOL)
			return;
		m_center=CPGLPointD(x,y);
		ReDraw();
	}
	CPGLPointD GetCenter(){return m_center;}
};


PGL_DECLARE_SMARTPTR(CPGLGeoCircle);